package com.sz.wallet_demo.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "余额变动明细实体类")
@TableName("balance_change")
public class BalanceChange {
    @ApiModelProperty(value = "明细ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "钱包ID")
    @TableField("wallet_id")
    private Integer walletId;

    @ApiModelProperty(value = "流水号 即订单编号")
    @TableField("serial_number")
    private String serialNumber;

    @ApiModelProperty(value = "变动金额")
    @TableField("change_amount")
    private BigDecimal changeAmount;

    @ApiModelProperty(value = "变动类型：1-充值，2-消费，3-退款，4-提现")
    @TableField("change_type")
    private Integer changeType;

    @ApiModelProperty(value = "变动时间")
    @TableField("change_time")
    private Date changeTime;
}